package com.crm.jdy.service.drp;

import com.crm.jdy.common.dto.WInInfoDto;
import com.crm.jdy.common.mapper.FRecordInfoMapper;
import com.crm.jdy.common.pojo.TeamInfo;
import com.crm.jdy.common.pojo.WInInfo;
import com.crm.jdy.common.mapper.WInInfoMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.dubbo.config.annotation.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**   
 * @Description:(入库列表信息服务实现)
 *
 * @version: V1.0
 * @author: kong
 * 
 */
@Service(version = "${service.version}")
@Component
public class WInInfoServiceImpl  extends ServiceImpl<WInInfoMapper,WInInfo> implements WInInfoService  {

    @Autowired
    WInInfoMapper wInInfoMapper;

    @Override
    public PageInfo<WInInfo> seleteWInInfo(WInInfoDto projectInfoDto) {
        PageHelper.startPage( projectInfoDto.getCurrentPage(),projectInfoDto.getPageSize());
        List<WInInfo> bookList = wInInfoMapper.seleteWInInfo(projectInfoDto);
        PageInfo<WInInfo> pageInfo = new PageInfo<WInInfo>(bookList);
        return pageInfo;
    }

    @Override
    public boolean updateWInInfo(WInInfo projectInfo) {
        return wInInfoMapper.updateById(projectInfo) > 0;
    }

    @Override
    public boolean addWInInfo(WInInfo projectInfo) {
        return wInInfoMapper.insert(projectInfo) > 0;
    }

    @Override
    public boolean removeWInInfo(String inId) {
        return wInInfoMapper.deleteById(inId) > 0;
    }
}